<?php

namespace app\admin\validate;

use think\Validate;

class SCategory extends Validate
{
    protected $rule = [
        'parent_id'=> 'require|number',
        'category_name'=> 'require',
        'order_num'=>'require|number',
        'status'=>["require","in"=>"0,1"]
    ];

    protected $message = [
        'parent_id.require'=>'上级分类必须',
        'parent_id.number'=>'上级分类必须为数字',
        'category_name'=> '分类名称必须',
        'order_num.require'=>'排序必须',
        'order_num.number'=>'排序必须为数字',
        'status.require'=>'状态必须',
        'status.in'=>'状态数值错误',
    ];
}
